package com.dzsw.zk.controller;

import com.dzsw.zk.util.ZkApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
public class ZkController {

    @Resource
    private ZkApi zkApi;

    @GetMapping("/test")
    public void test() {
        zkApi.createNode("/0/0", "back soon.");
    }


    @GetMapping("/t1")
    public String test1() {
        return "ok";
    }
}
